package com.hypo.business.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "tb_user")
public class User {
    //用户ID
    @TableId(value = "user_id", type = IdType.AUTO)
    private Long userId;
    //用户账号
    @TableField(value = "user_name")
    private String userName;
    //用户昵称
    @TableField(value = "nick_name")
    private String nickName;
    //用户密码
    @TableField(value = "user_password")
    private String userPassword;
    //头像
    private String avatar;
    //用户角色
    @TableField(value = "user_role")
    private String userRole;
    //用户性别（0女 1男 2未知）
    @JsonSerialize(using = ToStringSerializer.class)
    private Integer gender;
    //电话
    private String phone;
    //账号状态（0禁用 1 启用）
    @JsonSerialize(using = ToStringSerializer.class)
    private Integer status;
    //创建时间
    @TableField(value = "create_time")
    private LocalDateTime createTime;
    //更新时间
    @TableField(value = "update_time")
    private LocalDateTime updateTime;
    //备注
    private String remark;
}
